QuickOPC User's Guide and Reference
SetByteArrayValue(Byte[],Int32) Method



OpcLabs.BaseLib Assembly > OpcLabs.BaseLib.DataTypeModel Namespace > OpaqueData Class > SetByteArrayValue Method : SetByteArrayValue(Byte[],Int32) Method
The value expressed as array of bytes.
Size in bits of the resulting value.
Sets the current value from a given array of bytes and size in bits.
Syntax
'Declaration
 
Public Overloads Sub SetByteArrayValue( _
   ByVal byteArray() As Byte, _
   ByVal sizeInBits As Integer _
) 
'Usage
 
Dim instance As OpaqueData
Dim byteArray() As Byte
Dim sizeInBits As Integer
 
instance.SetByteArrayValue(byteArray, sizeInBits)
public void SetByteArrayValue( 
   byte[] byteArray,
   int sizeInBits
)
public:
void SetByteArrayValue( 
   array<byte>^ byteArray,
   int sizeInBits
) 

Parameters

byteArray
The value expressed as array of bytes.
sizeInBits
Size in bits of the resulting value.
Remarks

The sizeInBits must be equal to or less than the number of bits in the byteArray (the length of the byte array times 8).

Note that the byte array value is only synchronized with the bit array after the bit array has been set to a different object.

Requirements

Target Platforms: .NET Framework: Windows 10 (selected versions), Windows 11 (selected versions), Windows Server 2016, Windows Server 2022; .NET: Linux, macOS, Microsoft Windows

See Also